package com.zeros.mysplashtwo.base;

import com.zeros.mysplashtwo.utils.ZlogUtilTwo;

/**
 * Presenter基础类 on 2017/12/21.
 */

public class BasePresenter<V extends IBaseView> implements IBasePresenter<V> {

    public V view;

    @Override
    public void attachView(V view) {
        this.view = view;
    }

    @Override
    public void detachView() {
        this.view = null;
    }

    public V getMyView() {
        return view;
    }

    public boolean isAttachView(){
        return view != null;
    }

    public void checkAttachView() {
        if (!isAttachView()) {
            ZlogUtilTwo.e("====>View没有连接！！！");
        }
    }
}
